package com.yuanfeng.commoms.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.math.BigDecimal;

@Component
@Data
public class WXPayConfigShop {
	@Value("${domainName}")
	public  String domainName ;

	@PostConstruct
	public  String getDomainNameUrl() {
		PLATFORM_URL = this.domainName + "/ShoppingPayment/";
		VIDEO_PAY_NOTIFY = this.domainName + "/ShoppingPayment/pay/videoWxPayNotify/";
		return DOMAIN_NAME_URL = this.domainName;
	}

	/**
	 * 域名
	 */
	public static String DOMAIN_NAME_URL;


	// 导出路径
	public static  String PLATFORM_URL = null ;// 平台后台项目路径



//	public static String NOTIFY_URL = "https://javadev.yuanfengtest.com/ShoppingPayment/WXPay/notifyWeiXinPay";
	public static String APP_ID = "wx4e4622171870b7d5"; // 公众账号appid（改为自己实际的）
	public static String APP_SECRET = "ae108237be5f779411c372c1111232bb";


	public static String REDIRECT_URL = "https://javatest.yuanfengtest.com/h5/#/member/orderlist/orderlist";


	// 小程序
	private String Applet_APP_ID ; // appid（改为自己实际的）
	private String Applet_APP_SECRET ;

	private String MCH_ID ; // 商户号（改为自己实际的）
	private String API_KEY ;

	private String weChatWapPath ;

	//回调
	public String NOTIFY_URL ;

	// 退款url
	public static String REFUND_URL = "https://api.mch.weixin.qq.com/secapi/pay/refund";

	/**
	 * 直播微信回调
	 */
	public static  String VIDEO_PAY_NOTIFY ;

	/**
	 * 单笔最低转账金额0.3元
	 */
	public static final BigDecimal MIN_AMOUNT = new BigDecimal("0.3");

	public static final String BODY_DESC = "交易";


}
